package com.example.demo.service;


import org.springframework.stereotype.Component;

@Component
public class MQListener {
//    @RabbitHandler
//    @RabbitListener(queues = CommonConst.QUEUE_COLLECT_ORDER_TO_DB)
//    public void collectTaskDone(String message) {
//        String payOrderId = "";
//        try {
//            log.info("{} receive msg {}", CommonConst.QUEUE_COLLECT_ORDER_TO_DB, message);
//            TransCollectOrder order = JSON.parseObject(message, TransCollectOrder.class);
//            payOrderId = order.getPayOrderId();
//            orderStorage.collectOrderUpdateToDB(order);
//        } catch (Throwable e) {
//            log.error("collect task done exception,details {}", e.getMessage(), e);
//        } finally {
//            redisDao.unlock(StringUtils.join(RedisKey.QUERYING_ORDER.getKey(), payOrderId));
//        }
//
//    }
}
